package com.hsp.demo_10.myabstract.employee;

public class Manager extends Employee{

    private double bonus;

    public Manager(){}

    public Manager(String name, int age, double salary, double bonus) {
        super(name, age, salary);
        this.bonus = bonus;
    }

    @Override
    public void work() {
        System.out.println("Manager的工资为：" + (this.bonus + this.getSalary()));
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }
}
